package net.wofly.sale.exchange.service.impl;

import net.wofly.sale.exchange.domain.CardExchangeContent;
import net.wofly.sale.exchange.repository.CardExchangeContentRepository;
import net.wofly.sale.exchange.service.ICardExchangeContentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service("iCardExchangeContentService")
public class CardExchangeContentServiceImpl implements ICardExchangeContentService {

    @Autowired
    CardExchangeContentRepository cardExchangeContentRepository;

    @Override
    public void save(List<CardExchangeContent> cardExchangeContents) {
        cardExchangeContentRepository.save(cardExchangeContents);
    }

    @Override
    public List<CardExchangeContent> findByCardExchangeID(String cardExchangeID) {
        return cardExchangeContentRepository.findByCardExchangeID(cardExchangeID);
    }
}
